﻿using System;

namespace NSDuctTape
{
	internal static class Classes
	{
		public static readonly IntPtr AutoReleasePool;
		public static readonly IntPtr Bundle;
		public static readonly IntPtr Color;
		public static readonly IntPtr ColorSpace;
		public static readonly IntPtr Dictionary;
		public static readonly IntPtr Exception;
		public static readonly IntPtr Invocation;
		public static readonly IntPtr MethodSignature;
		public static readonly IntPtr MutableArray;
		public static readonly IntPtr Number;
		public static readonly IntPtr Object;
		public static readonly IntPtr String;
		public static readonly IntPtr Application;
		
		static Classes()
		{
			// NOTE: For some freaky reason, if these are defined as they are declared, NSColor,
			// NSColorSpace, and NSApplication get initialized to IntPtr.Zero.
			
			AutoReleasePool = ObjectiveCMethods.GetClass("NSAutoreleasePool");
			Bundle =	ObjectiveCMethods.GetClass("NSBundle");
			Color = ObjectiveCMethods.GetClass("NSColor");
			ColorSpace = ObjectiveCMethods.GetClass("NSColorSpace");
			Dictionary = ObjectiveCMethods.GetClass("NSDictionary");
			Exception = ObjectiveCMethods.GetClass("NSException");
			Invocation = ObjectiveCMethods.GetClass("NSInvocation");
			MethodSignature = ObjectiveCMethods.GetClass("NSMethodSignature");
			MutableArray = ObjectiveCMethods.GetClass("NSMutableArray");
			Number = ObjectiveCMethods.GetClass("NSNumber");
			Object = ObjectiveCMethods.GetClass("NSObject");
			String = ObjectiveCMethods.GetClass("NSString");	
			Application = ObjectiveCMethods.GetClass("NSApplication");
		}
	}
}
